package com.chatplus.application.domain.entity.chat;

import com.baomidou.mybatisplus.annotation.*;
import com.chatplus.application.datasource.id.IdEntity;
import org.apache.ibatis.type.Alias;


/**
 * <p>Table: t_chat_history - 聊天历史记录</p>
 *
 * @author developer
 */
@Alias("chatHistory")
@TableName(value = "t_chat_history", autoResultMap = true)
public class ChatHistoryEntity extends IdEntity {

    /**
     * 用户 ID
     */
    private Long userId;
    /**
     * 会话 ID
     */
    private String chatId;
    /**
     * 类型：prompt|reply
     */
    private String type;
    /**
     * 角色图标
     */
    private String icon;
    /**
     * 角色 ID
     */
    private Long roleId;
    /**
     * 聊天内容
     */
    private String content;
    /**
     * 耗费 token 数量
     */
    private Integer tokens;
    /**
     * 是否允许作为上下文语料
     */
    private Boolean useContext;
    /**
     * 每次保存 reply prompt 生成当前问题和答复的 item id，用于关联
     */
    private Long itemId;

    public Long getUserId() {
        return this.userId;
    }

    public void setUserId(Long userId) {
        this.userId =  userId;
    }

    public String getChatId() {
        return this.chatId;
    }

    public void setChatId(String chatId) {
        this.chatId =  chatId;
    }

    public String getType() {
        return this.type;
    }

    public void setType(String type) {
        this.type =  type;
    }

    public String getIcon() {
        return this.icon;
    }

    public void setIcon(String icon) {
        this.icon =  icon;
    }

    public Long getRoleId() {
        return this.roleId;
    }

    public void setRoleId(Long roleId) {
        this.roleId =  roleId;
    }

    public String getContent() {
        return this.content;
    }

    public void setContent(String content) {
        this.content =  content;
    }

    public Integer getTokens() {
        return this.tokens;
    }

    public void setTokens(Integer tokens) {
        this.tokens =  tokens;
    }

    public Boolean getUseContext() {
        return this.useContext;
    }

    public void setUseContext(Boolean useContext) {
        this.useContext =  useContext;
    }

    public Long getItemId() {
        return itemId;
    }

    public void setItemId(Long itemId) {
        this.itemId = itemId;
    }
}
